act_site = [1 2 4 7 8];
pas_site = [3 5 6 9];
con_site = 10;

for time = 1:7
    for site = 1:9
        for layer = 1:4
            act = proj_meta(site).rd(layer,time).act(:,1:7500);
            act = act - 1.2;
            act(act < 0) = 0;
            auc{site,time,layer} = sum(act,2)';
        end
        auc_al{site,time} = [auc{site,time,:}];
    end
    auc_act_m(time) = mean([auc_al{act_site,time}]);
    auc_pas_m(time) = mean([auc_al{pas_site,time}]);
    auc_act_s(time) = std([auc_al{act_site,time}])/sqrt(996);
    auc_pas_s(time) = std([auc_al{pas_site,time}])/sqrt(764);
end

figure;hold on
errorbar(auc_act_m,auc_act_s)
errorbar(auc_pas_m,auc_pas_s,'r')